There is a desire to value financial contracts. Some financial contracts are relatively simple. Simple contracts can be relatively easy to value. For example, a contract where party A loans party B US $100 today and party B agrees to pay back the US $100 plus 5% interest in 1 year may be viewed (from the perspective of party A) as a cash outflow of US $100 at time t=0 and a cash inflow of US $105 at a time t=1 year. The present value of a such future cash flow can be valued according to the well known present value equation
                    NPV        =                                            ∑                              t                =                1                            T                        ⁢                                          R                t                                                              (                                      1                    +                    r                                    )                                t                                              -                      R            0                                              (        1        )            where: R0 is the initial investment at time t=0; t is a time of a cash flow; Rt is the amount of the cash flow at time t (positive for incoming cash flows and negative for outgoing cash flows); T is the time horizon under consideration; and r is the discount rate. If the net present value (NPV) of a contract is NPV>0, then it would be an attractive contract; if NPV<0, then the contract is unattractive; and if the NPV=0, then a party would be indifferent to the contract.
In the example case described above, the initial investment is R0=$100 and the return at t=T=1 year is R1=$105. Assuming that party A can borrow the US $100 at the same 5% rate, then the discount rate r in equation (1) may be set to r=0.05 which results in NPV=0. This is expected, since party A would be indifferent to receiving $105 in 1 year if it also had to pay back $105 in 1 year. However, if party A could borrow money at 4%, the discount rate r in equation (1) may be set to r=0.04. Assuming that party A could still arrange a contract with party B to loan party B $100 today and to receive $105 in a year, then the NPV of such a contract would NPV=$0.96 which makes the contract attractive to party A.
The NPV of the contract does not tell the whole story, however, as the NPV assumes that certain market data is fixed. For example, the example case described above assumes that the rate at which party A can borrow money is fixed for the entire year and this assumption is reflected in the constant discount rate r. In reality, however, market data can fluctuate and there is associated risk that the NPV of a financial contract can vary with fluctuations in market data. For example, the rate at which party A is paying interest on borrowed money (which is used for the discount rate r in equation (1)) could increase in middle of the contract. In addition to the NPV of a contract, it is therefore desirable to know the dependence of the NPV on changes to market data or, in other words, the risk that the NPV will change in response to corresponding changes in market data.
In the case of the simple example contract, the risk associated with a change in the rate that party A can borrow money (as reflected in the discount rate r) may be expressed as the amount of change in the NPV (∂NPV) for a small change in the discount rate r (∂r) and may be estimated using the derivative
      ∂          (      NPV      )            ∂    r  of the NPV equation (1).
In many cases, financial contracts are considerably more complex than the aforementioned example. In such cases, it can be considerably more difficult to valuate the financial contract and can be correspondingly more difficult to evaluate the risk of the contract valuation on changes in market data. There is a desire to value financial contracts and to evaluate the risk associated with such contracts regardless of their complexity.